// 登录
let username = localStorage.getItem('username')
if (username) {
	let usernameP = document.querySelector('#username');
	let item = document.querySelector('.item')
	let login = document.querySelector('.login')
	item.style.display = 'block'
	login.style.display = 'none'
	usernameP.innerHTML = username;

}
// 退出
let logoutBtn = document.querySelector('#logout')
logoutBtn.onclick = function () {
	localStorage.removeItem('username')
	let usernameP = document.querySelector('#username');
	let item = document.querySelector('.item')
	let login = document.querySelector('.login')
	alert('退出成功')
	item.style.display = 'none'
	login.style.display = 'block'
	usernameP.innerHTML = username;

}
// 返回顶部
let pict=document.querySelector('.top')
window.onscroll = function () {
	let top = document.scrollingElement.scrollTop
	if (top>=500) {
		pict.style.display = 'block'
	}
	else{
		pict.style.display = 'none'
	}
	}
	
	pict.onclick = function() {
		document.scrollingElement.scrollTop = 0
	}






// 明星单品
let extend = document.querySelector('.extend')
console.log(extend)
let dropcon = document.querySelector('.drop-con')
console.log(dropcon)
extend.onmouseover = function () {
	dropcon.style.display = 'block'
}
extend.onmouseout = function () {
	dropcon.style.display = 'none'
}
dropcon.onmouseenter = function () {
	dropcon.style.display = 'block'
}
dropcon.onmouseout = function () {
	dropcon.style.display = 'none'
}


//脸


let extend1 = document.querySelector('.extend1')
console.log(extend)
let dropcon1 = document.querySelector('.drop-con1')
console.log(dropcon)
extend1.onmouseover = function () {
	dropcon1.style.display = 'block'
}
extend1.onmouseout = function () {
	dropcon1.style.display = 'none'
}
dropcon1.onmouseenter = function () {
	dropcon1.style.display = 'block'
}
dropcon1.onmouseout = function () {
	dropcon1.style.display = 'none'
}

// 眼

let extend2 = document.querySelector('.extend2')
console.log(extend)
let dropcon2 = document.querySelector('.drop-con2')
console.log(dropcon)
extend2.onmouseover = function () {
	dropcon2.style.display = 'block'
}
extend2.onmouseout = function () {
	dropcon2.style.display = 'none'
}
dropcon2.onmouseenter = function () {
	dropcon2.style.display = 'block'
}
dropcon2.onmouseout = function () {
	dropcon2.style.display = 'none'
}

// 唇

let extend3 = document.querySelector('.extend3')
console.log(extend)
let dropcon3 = document.querySelector('.drop-con3')
console.log(dropcon)
extend3.onmouseover = function () {
	dropcon3.style.display = 'block'
}
extend3.onmouseout = function () {
	dropcon3.style.display = 'none'
}
dropcon3.onmouseenter = function () {
	dropcon3.style.display = 'block'
}
dropcon3.onmouseout = function () {
	dropcon3.style.display = 'none'
}

// 护肤


let extend4 = document.querySelector('.extend4')
console.log(extend)
let dropcon4 = document.querySelector('.drop-con4')
console.log(dropcon)
extend4.onmouseover = function () {
	dropcon4.style.display = 'block'
}
extend4.onmouseout = function () {
	dropcon4.style.display = 'none'
}
dropcon4.onmouseenter = function () {
	dropcon4.style.display = 'block'
}
dropcon4.onmouseout = function () {
	dropcon4.style.display = 'none'
}

// 时尚学院

let extend5 = document.querySelector('.extend5')
console.log(extend)
let dropcon5 = document.querySelector('.drop-con5')
console.log(dropcon)
extend5.onmouseover = function () {
	dropcon5.style.display = 'block'
}
extend5.onmouseout = function () {
	dropcon5.style.display = 'none'
}
dropcon5.onmouseenter = function () {
	dropcon5.style.display = 'block'
}
dropcon5.onmouseout = function () {
	dropcon5.style.display = 'none'
}


// 走进卡姿兰


let extend6 = document.querySelector('.extend6')
console.log(extend)
let dropcon6 = document.querySelector('.drop-con6')
console.log(dropcon)
extend6.onmouseover = function () {
	dropcon6.style.display = 'block'
}
extend6.onmouseout = function () {
	dropcon6.style.display = 'none'
}
dropcon6.onmouseenter = function () {
	dropcon6.style.display = 'block'
}
dropcon6.onmouseout = function () {
	dropcon6.style.display = 'none'
}

